<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath}"></c:set>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ReaderInformation</title>

<!-- BEGIN GLOBAL MANDATORY STYLES -->

<link href="${path}/css/basic/bootstrap.min.css" rel="stylesheet"
	type="text/css" />

<link href="${path}/css/basic/bootstrap-responsive.min.css"
	rel="stylesheet" type="text/css" />

<link href="${path}/css/basic/font-awesome.min.css" rel="stylesheet"
	type="text/css" />

<link href="${path}/css/basic/style-metro.css" rel="stylesheet"
	type="text/css" />

<link href="${path}/css/basic/style.css" rel="stylesheet"
	type="text/css" />

<link href="${path}/css/basic/style-responsive.css" rel="stylesheet"
	type="text/css" />

<link href="${path}/css/basic/default.css" rel="stylesheet"
	type="text/css" id="style_color" />

<link href="${path}/css/basic/uniform.default.css" rel="stylesheet"
	type="text/css" />

<!-- END GLOBAL MANDATORY STYLES -->

<!-- BEGIN PAGE LEVEL STYLES -->

<link rel="stylesheet" href="${path}/css/basic/DT_bootstrap.css" />

<!-- END PAGE LEVEL STYLES -->

</head>
<body>

	<!-- BEGIN PAGE CONTAINER-->

	<div class="container-fluid">

		<!-- BEGIN PAGE HEADER-->

		<div class="row-fluid">

			<div class="span12">

				<!-- BEGIN PAGE TITLE & BREADCRUMB-->

				<h3 class="page-title">Reader Query</h3>

				<ul class="breadcrumb">

					<li><i class="icon-home"></i> <a href="${path}/admin/main">Home</a>
						<i class="icon-angle-right"></i></li>

					<li>Reader Query</li>

				</ul>

				<!-- END PAGE TITLE & BREADCRUMB-->

			</div>

		</div>

		<!-- END PAGE HEADER-->

		<!-- BEGIN PAGE CONTENT-->

		<div class="row-fluid">

			<div class="span12">

				<!-- BEGIN CONDENSED TABLE PORTLET-->

				<div class="portlet box green">

					<div class="portlet-title">

						<div class="caption">Reader Query</div>

						<div class="tools">

							<a href="javascript:;" class="collapse"></a>

						</div>

					</div>
					<div class="portlet-body">
						<div class="clearfix">
							<div class="btn-group">
								<button class="btn green"
									onclick="location.href='${path}/readerinfo/update'">
									Add Reader <i class="icon-plus"></i>
								</button>
							</div>
							<div class="btn-group pull-right">
								<label>Reader Name: <input class="m-wrap medium"
									type="text" name="readerName" placeholder="Enter Reader Name" />
									<button class="btn green">Search</button></label>
							</div>
						</div>
						<table class="table table-bordered table-hover">
							<thead>
								<tr>
									<th>#</th>
									<th>Name</th>
									<th>Sex</th>
									<th>Phone</th>
									<th>Email</th>
									<th>Department</th>
									<th>Delete Id</th>
									<th>Delete Datetime</th>
									<th>Edit</th>
									<th>Delete</th>
								</tr>
							</thead>

							<tbody>
								<c:forEach items="${readerlist}" var="readerinfo" varStatus="vs">
									<tr>
										<td>${vs.count}</td>
										<td>${readerinfo.name}</td>
										<td>${readerinfo.sex}</td>
										<td>${readerinfo.phone}</td>
										<td>${readerinfo.email}</td>
										<td>${readerinfo.deptId.name}</td>
										<td>${readerinfo.deleteReader.name}</td>
										<td>${readerinfo.deleteDateTime}</td>
										<c:if test="${not empty readerinfo.deleteReader}">
											<td style="width: 60px"><a
												class="btn mini green disabled" href="javascript:void(0);"><i
													class="icon-edit"></i> Edit</a></td>
											<td style="width: 70px"><a
												class="btn mini green disabled" href="javascript:void(0);"><i
													class="icon-trash"></i> Delete</a></td>
										</c:if>
										<c:if test="${empty readerinfo.deleteReader}">
											<td style="width: 60px"><a class="btn mini green"
												href="${path}/readerinfo/update?id=${readerinfo.id}"><i
													class="icon-edit"></i> Edit</a></td>
											<td style="width: 70px"><a class="btn mini green"
												href="${path}/readerinfo/delete?id=${readerinfo.id}"><i
													class="icon-trash"></i> Delete</a></td>
										</c:if>
									</tr>
								</c:forEach>
							</tbody>
						</table>
					</div>
				</div>

			</div>
		</div>
		<!-- END PAGE CONTENT-->

	</div>
	<!-- END PAGE CONTAINER-->


	<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->

	<!-- BEGIN CORE PLUGINS -->

	<script src="${path}/js/basic/jquery-1.10.1.min.js"
		type="text/javascript"></script>

	<script src="${path}/js/basic/jquery-migrate-1.2.1.min.js"
		type="text/javascript"></script>

	<!-- IMPORTANT! Load jquery-ui-1.10.1.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->

	<script src="${path}/js/basic/jquery-ui-1.10.1.custom.min.js"
		type="text/javascript"></script>

	<script src="${path}/js/basic/bootstrap.min.js" type="text/javascript"></script>

	<!--[if lt IE 9]>

	<script src="${path}/js/basic/excanvas.min.js"></script>

	<script src="${path}/js/basic/respond.min.js"></script>  

	<![endif]-->

	<script src="${path}/js/basic/jquery.slimscroll.min.js"
		type="text/javascript"></script>

	<script src="${path}/js/basic/jquery.blockui.min.js"
		type="text/javascript"></script>

	<script src="${path}/js/basic/jquery.cookie.min.js"
		type="text/javascript"></script>

	<script src="${path}/js/basic/jquery.uniform.min.js"
		type="text/javascript"></script>

	<!-- END CORE PLUGINS -->

	<script src="${path}/js/basic/app.js"></script>

	<script>
		jQuery(document).ready(function() {

			// initiate layout and plugins

			App.init();

		});
	</script>
</body>
</html>